<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.DriverManager"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%
	//被删除的id
	String id=request.getParameter("id");
	//执行删除操作
	String sql="delete from senior where id = ?";
	
	Class.forName("com.mysql.jdbc.Driver");					
	Connection conn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/toursim", "root", "gaoxing311");
	
	PreparedStatement ps=conn.prepareStatement(sql);
	ps.setInt(1,Integer.parseInt(id));
	ps.execute();
	//重新返回列表
	
	response.sendRedirect("page/index_main.jsp");

 %>
